--공유 정보 관리서비스
/*
drop table java_shared_service
create table java_shared_service(
keyword varchar2(30)primary key,
contents varchar2(1000)not null,
info_date date not null)

select * from java_shared_service

--정보 검색
create table infomation(
keyword_no number primary key,
keyword varchar2(30) not null,
item_no number not null,
constraint fk_java_shared_service foreign key (keyword)  references java_shared_service(keyword),
constraint fk_java_item foreign key (item_no)  references java_item(item_no))

drop table infomation;
--keywords 시퀀스(item_no)
create sequence keywords_seq;
drop sequence keywords_seq


drop table category
drop table division
drop table section
--대분류
create sequence category_no
drop sequence category_no
drop table category
create table category(
	category_no number primary key,
	java_category varchar2(30) not null
)

insert into category(category_no,java_category) values(category_no.nextval,'javaSE');
insert into category(category_no,java_category) values(category_no.nextval,'Ajax');
insert into category(category_no,java_category) values(category_no.nextval,'jQuery');


--중분류
create sequence division_no
drop sequence division_no
drop table division
create table division(
	division_no number primary key,
	category_no number not null,
	java_division varchar2(30) not null,
	java_category varchar2(30) not null,
	constraint fk_category foreign key (category_no)  references category(category_no) on delete cascade
)



--소분류
create sequence section_no
drop sequence section_no
drop table section
create table section(
	section_no number primary key,
	division_no number not null,
	java_section varchar2(30) not null,
	java_division varchar2(30) not null,
	java_category varchar2(30) not null,
	constraint fk_division foreign key(division_no) references division(division_no) on delete cascade
)
*/
select * from member;